﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ScriptEngine.Interface;

namespace ScriptEngine
{
    public class ScriptContext : IScriptContext
    {
        Dictionary<string, object> elements = new Dictionary<string, object>();
        
        public object Value { get; set; }

        public object this[string name]
        {
            get
            {
                if (elements.ContainsKey(name))
                {
                    return elements[name];
                }
                else
                {
                    return null;
                }
            }

            set 
            {
                elements[name] = value;
            }
        }

    }
}